#include <vector>
using namespace std;

class Solution
{
public:
    void moveZeroes(vector<int>& nums)
    {
        int n = nums.size(), low = 0;
        for(int i = 0; i < n; i++)
        {
            if(nums[i] == 0)
            {
                continue;
            }
            nums[low] = nums[i];
            low += 1;
        }
        for(int i = low; i < n; i++)
        {
            nums[i] = 0;
        }
    }
};
